<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <title>抽奖</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link href="__STATIC__/webapp/css/mui.min.css" rel="stylesheet"/>
    <link href="__STATIC__/webapp/css/lottery.css" rel="stylesheet"/>
    <link href="__STATIC__/webapp/css/animate.css" rel="stylesheet">
    <script type="text/javascript" src="__STATIC__/webapp/js/jquery-1.11.0.js"></script>
    <script src="__STATIC__/webapp/js/jq_scroll.js" type="text/javascript"></script>
    <script src="__STATIC__/webapp/js/mui.js"></script>
    <script src="__STATIC__/webapp/js/awardRotate.js"></script>
    <script src="__STATIC__/webapp/js/template.js"></script>
    <script src="__STATIC__/webapp/js/wow.min.js"></script>
    <script src="__STATIC__/webapp/js/alert_plug.js"></script>

    <link href="__STATIC__/webapp/js/dialog/dialog.css" type="text/css" rel="stylesheet">
    <script src="__STATIC__/webapp/js/dialog/dialog.js"></script>

    <script src="__STATIC__/webapp/js/confirm.js"></script>

    {include file="public/weixin_sdk" /}

    <script type="text/javascript">

        var URL = {
            SiteUrl: " {$url}",
        };

        var lotteryType= "{$type}";
        var loading="__STATIC__/webapp/js/dialog/icon/loading.gif";

        $(document).ready(function () {
            $("#scrollDiv").Scroll({line: 1, speed: 500, timer: 300, up: "but_up", down: "but_down"});
        });
    </script>

</head>

<body>
<!--<header id="mui-color" class="mui-bar mui-bar-nav">
    <div class="mui-icon  mui-icon-left-nav mui-pull-left lotteryBack"></div>
    <h1 class="mui-title">抽奖</h1>
</header>-->


<div id="lodding" style="margin: 50% 0 0 0; text-align: center; color: #FFF">
    <span class="mui-spinner"></span>
    <p>正在努力加载...</p>
</div>

<div class="lottery" id="lottery_model" style="display: none;">

    <img src="__STATIC__/webapp/js/dialog/icon/loading.gif" style="display: none;">

    <div class="lottery-title wow zoomInDown animated">
        <img src="__STATIC__/webapp/lottery/images/app_lottery_title.png" id="app_lottery_title">
    </div>

    <p class="xx1"></p>
    <p  data-wow-delay="1.5s" class="dog wow animated bounceInRight "></p>


    <div data-wow-delay="0.8s" data-wow-duration="1s" class="lottery_num_model wow rollIn bg-blue animated"><p>剩余</p>
        <p><span id="number_container">{$user_info.lottery_count}</span>次机会</p></div>


    <div class="lottery-yp">
        <div class="lottery-yp-wb">
            <div class="banner" >
                <div class="turnplate wow rollIn bg-yellow animated" data-wow-delay="0.5s" id="app_turnplate"
                     data-type="bg">
                    <canvas class="item" id="wheelcanvas" width="480px" height="480px"></canvas>
                    <div id="pointer" class="pointer lotStop">
                        <img src="__STATIC__/webapp/lottery/images/timg.gif">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="winners" data-type="bg" id="app_winners_bg">
        <div class="winners-list">
            <div style=" width: 150px; height: 30px;margin: 0 auto; margin-top: 23px;"></div>
            <h3 style="height: 0;"></h3>
            <div id="scrollDiv">
                <ul id="popTpl">
                </ul>
            </div>
        </div>
    </div>

    <div class="btn_group ">
        <p id="lottery_role_btn"><img src="__STATIC__/webapp/lottery/images/btn2.png"></p>
        <p id="my_lottery_btn">
            <a href="{:url('webapi/user/user_center')}">
                <img src="__STATIC__/webapp/lottery/images/btn3.png">
            </a>
        </p>
    </div>


    <div class="active">
        <h2>奖品说明</h2>
        <ul id="rule_ul">
        </ul>
    </div>
    <div class="lottery-bg"><img src="__STATIC__/webapp/lottery/images/app_lottery_img.png" id="app_lottery_img"></div>
    <div id="model"></div>
</div>

<div id="filter_bg" class="filter_bg"></div>
<div id="filter_bg2" class="filter_bg"></div>
<div id="filter_bg3" class="filter_bg"></div>

<div class="wow bounceInDown   animated" id="lottery_dialog" ><!--class="wow flipInX  animated"-->
    <div class="cons">
        <div id="nodeInfo"></div>
        <span id="closeBtn" class="shBtn shBtn2">关闭</span>
    </div>
</div>

<div id="lottery_role_dialog">
    <p class="tit">抽奖规则说明</p>
    <div class="test test-1" id="rule_gc">

    </div>
</div>

</body>


<script>

    var getLottery = URL.SiteUrl+"/index.php/webapi/lottery/get_lottery_list";

    var startLottery = URL.SiteUrl+"/index.php/webapi/lottery/play";

    //

    template.helper('dateFormat', function (date) {
        var year = new Date(date * 1000).getFullYear();
        var month = new Date(date * 1000).getMonth() + 1;
        var day = new Date(date * 1000).getDate();
        var h = new Date(date * 1000).getHours();
        var m = new Date(date * 1000).getMinutes();
        var s = new Date(date * 1000).getSeconds();
        var time = year + '-' + month + '-' + day + '   ' + '   ' + format(h) + ':' + format(m) + ":" + format(s)
        return time
    })

    function format(time) {
        return time > 10 ? time : "0" + time
    }
</script>

<script src="__STATIC__/webapp/js/lottery.js"></script>

{include file="public/weixin_share" /}

</html>